package com.cdd.common.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("orders")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String goodsId;

    private Integer userId;

    private String orderNo;

    private String externalOrderNo;

    private BigDecimal totalPrice;

    private String takeName;

    private String takePhone;

    private String takeAddress;

    private String remark;

    private LocalDateTime payTime;

    private String payType;

    //订单状态 0待支付 1已支付 2已发货 3已收货 4已取消
    private Integer status;

    private LocalDateTime createTime;

    private LocalDateTime cancelTime;


    @TableField(exist = false)
    private List<OrderGoods> orderGoods;

}
